import type { catagoryMenu, goodsByTypeId, goodsPicByTypeId } from '@/types/category'
import { http } from '@/utils/http'

export const getMenu = () => {
  return http<catagoryMenu[]>({
    method: 'GET',
    url: 'goods/goodsType/appGetGoodsTypeList',
    data: {},
  })
}

export const getGoodsByTypeId = (id: string) => {
  return http<goodsByTypeId>({
    method: 'GET',
    url: 'goods/goodsType/appGetGoodsTypeDataById',
    data: { id },
  })
}

export const getGoodsTypePicByTypeId = (id: string) => {
  return http<goodsPicByTypeId[]>({
    method: 'GET',
    url: 'goods/goodsType/appGetGoodsTypePicDataById',
    data: { id },
  })
}
